package com.runfast.paotui.dao.mapper;

import com.runfast.common.dao.IMapper;
import com.runfast.common.web.entity.Result;
import com.runfast.paotui.dao.model.Order;
import com.runfast.paotui.dao.model.OrderExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper extends IMapper<Order, Integer, OrderExample> {
 List<Order> findByShopperidAndStatus(@Param("shopperid") Integer shopperid, @Param("status") Integer status);



    Order findByUseridAndCode(@Param("userid") Integer userid, @Param("orderNo") String orderNo);

    void updateStatusAndTime(Order orderuser);

    List<Order> findByShopperid(Integer shopperid);

    List<Order> findListPageBean(@Param("pageSize") Integer pageSize, @Param("page") Integer page, @Param("otype") Integer otype, @Param("shopperId") Integer shopperId, @Param("agentid") Integer agentid, @Param("teamid") Integer teamid);

    int findCount(@Param("pageSize") Integer pageSize, @Param("page") Integer page, @Param("otype") Integer otype, @Param("shopperId") Integer shopperId, @Param("agentid") Integer agentid, @Param("teamid") Integer teamid);

    Order findByShopperidAndCode(@Param("shopperid") Integer shopperid, @Param("orderNo") String orderNo);

    Order get(Integer id);
}